package com.example.b_308.software.view.splash;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.PersistableBundle;

import com.example.b_308.software.R;
import com.example.b_308.software.controller.SplashController;
import com.example.b_308.software.view.base.BaseActivity;
import com.example.b_308.software.view.user.LoginActivity;



/**
 * Created by B-308 on 2017/11/15.
 */
public abstract class SplashActivity extends BaseActivity implements ISplashView {
    SplashController splashController;
    CountDownTimer countDownTimer = new CountDownTimer(1000, 1000) {
        @Override
        public void onTick(long millisUntilFinished) {

        }

        @Override
        public void onFinish() {
            startActivity(new Intent(SplashActivity.this,LoginActivity.class));
        }

    };
    @Override
    public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState){
        super.onCreate(savedInstanceState,persistentState);
        setContentView(R.layout.activity_splash);
        splashController = new SplashController(this);
        splashController.check();
        countDownTimer.start();
    }
}


